Supplementary information / reproducible research files for the manuscript 
Title: Pseudo-Value Approach for Length-Biased Cox Proportional Hazards Model

Authors: Mahboubeh Akbari, Najmeh Nakhaei Rad, and Ding-Geng Chen

Email: mahboubeh.akbarilakeh@up.ac.za


Session info:

R version 4.4.2 (2024-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_South Africa.utf8 
[2] LC_CTYPE=English_South Africa.utf8   
[3] LC_MONETARY=English_South Africa.utf8
[4] LC_NUMERIC=C                         
[5] LC_TIME=English_South Africa.utf8    


attached base packages:
[1] parallel  stats     graphics 
[4] grDevices utils     datasets 
[7] methods   base     

other attached packages:
 [1] ggpubr_0.6.0         ggplot2_3.5.1       tibble_3.2.1        pec_2023.04.12    
 [5] geepack_1.3.12       tidyr_1.3.1         rms_7.0-0           Hmisc_5.2-2       
 [9] plac_0.1.3           CoxPhLb_1.2.0       survival_3.7-0      prodlim_2024.06.25
[13] readr_2.1.5          dplyr_1.1.4         pbapply_1.7-2       doParallel_1.0.17 
[17] iterators_1.0.14     foreach_1.5.2     

loaded via a namespace (and not attached):
 [1] tidyselect_1.2.1     fastmap_1.2.0       TH.data_1.1-3       digest_0.6.37      
 [5] rpart_4.1.23         lifecycle_1.0.4     cluster_2.1.6       magrittr_2.0.3     
 [9] compiler_4.4.2       rlang_1.1.4         tools_4.4.2         utf8_1.2.4         
[13] data.table_1.16.2    ggsignif_0.6.4      knitr_1.49          timereg_2.0.6      
[17] htmlwidgets_1.6.4    abind_1.4-8         multcomp_1.4-28     polspline_1.1.25   
[21] withr_3.0.2          foreign_0.8-87      purrr_1.0.2         numDeriv_2016.8-1.1
[25] nnet_7.3-19          grid_4.4.2          fansi_1.0.6         colorspace_2.1-1   
[29] future_1.34.0        globals_0.16.3      scales_1.3.0        MASS_7.3-61        
[33] cli_3.6.3            mvtnorm_1.3-3       rmarkdown_2.29      generics_0.1.3     
[37] rstudioapi_0.17.1    future.apply_1.11.3 tzdb_0.4.0          stringr_1.5.1      
[41] splines_4.4.2        base64enc_0.1-3     vctrs_0.6.5         Matrix_1.7-1       
[45] sandwich_3.1-1       carData_3.0-5       SparseM_1.84-2      car_3.1-3          
[49] hms_1.1.3            rstatix_0.7.2       Formula_1.2-5       htmlTable_2.4.3    
[53] listenv_0.9.1        glue_1.7.0          parallelly_1.42.0   codetools_0.2-20   
[57] stringi_1.8.4        gtable_0.3.6        munsell_0.5.1       pillar_1.9.0       
[61] htmltools_0.5.8.1    quantreg_5.99.1     lava_1.8.1          R6_2.5.1           
[65] evaluate_1.0.1       lattice_0.22-6      backports_1.5.0     broom_1.0.7        
[69] MatrixModels_0.5-3   Rcpp_1.0.13-1       gridExtra_2.3       nlme_3.1-166       
[73] checkmate_2.3.2      xfun_0.49           zoo_1.8-12          pkgconfig_2.0.3  



Note: 

The CoxPhLb package is no longer available on CRAN. However, it can still be installed from the CRAN Archive. To install it in R, use the following command:

install.packages("https://cran.r-project.org/src/contrib/Archive/CoxPhLb/CoxPhLb_1.2.0.tar.gz", repos = NULL, type = "source")

For direct download or additional details, visit the archived page:

https://cran.r-project.org/web/packages/CoxPhLb/index.html



supplementary:

This folder contains the following data and files that can be used to reproduce all analysis, tables, and figures of the manuscript.
It contains three subfolders containing the following files

- simulation:

     This folder includes several codes (named 'code_sim_for_ ...' for different scenarioes) used for the simulation study, which is based on 2,000 
     repetitions using parallel processing (with 11 cores for mine). The outputs of the simulation are saved into the 'results' folder. 

     The file named "myfunctions" contains all the functions that are sourced into the other R files.

     To facilitate quicker reproducibility of the results, the codes have been changed to run with only 10 repetitions (nrep = 10 in the R script), 
     So, for this purpose, you can use the scripts in the 'intermediate_simulation' folder, which includes codes and results for reduced replication 
     of Scenario 1. The recommended order of execution is as follows: Fist, use the script 'code_sim_for_scenario 1.R' to save the results. Then use
     the scripts "Table 1.R" and "Figure1.R" to reproduce Table 1 and Figure 1, respectively. T Note that the results may differ from those in the 
     paper due to the reduced number of iterations. To obtain the results presented in the manuscript, run the scripts in the 'results' folder.
                  

- results: 

     This folder includes the results of all repetitions and simulations for the three scenarios discussed in the paper, organized into subfolders: 
     scen1_balance, scen2_balance, and scen3_balance. It also contains the codes used to reproduce tables and figures, which use the RData files saved in 
     the aforementioned folders. The R script 'Table 1.R' and 'Figure1.R' were used to generate Table 1 and Figure 1 of the manuscript; similar scripts 
     can be used for other tables and figures.


- case study:

     This folder contains the code used for the data application that generate Table 5 in the manuscript.




